<script type="text/javascript">
function showConfirmDialogWithLink(option){
    Ext.MessageBox.show({
        title:'Customer Connect',
        msg:option.msg,
        buttons:Ext.Msg.YESNO,
        fn:function (btn) {

            if (btn == 'no') {
                return false;
            } else {
				console.log(option.direct);
                if(option.direct != null) window.location = option.link;
                else   save(option);
				
               
            }
        }
    })
        
}
function showCmNotice(){
	   Ext.MessageBox.show({
        title:'Customer Connect',
        msg:'You are not authorized to use this feature',
         buttons:Ext.Msg.YES,
      
    })
	}
</script>


    <?php if ($model->getSalesOrders() != NULL): ?>
        <li><a href="index.php?r=invoices/update&invoice=<?= $model->getSalesOrders()->invoice ?>">Back To Sales Order</a></li>
    <?php endif ?>
   
    <li><a class="print-button" target="_blank" onclick="printSelect({link:'index.php?r=pdf&invno=<?= $model->invoice ?>',newtab:true})" >View/Print</a>
 
     
  

<?php
if ($model->jobnumber != null) {
    echo '<li>';
    echo CHtml::link('Go to Job', array('/jobs/update', 'jobid' => $model->jobnumber), array('class' => 'return-button'));
    echo '</li>';
}?>
